<template>
  <div class="home">
    
  </div>
</template>

<script lang="ts">
import { defineComponent } from 'vue';
export default defineComponent({
  name: 'Home',
  components: {
  
  },
  mounted(){
    if(localStorage.getItem('token')){
      if(localStorage.name=="管理员"){
        this.$router.push({path:'/admin'})
      }else{
        this.$router.push({path:'/student'})
      }
    }else{
        this.$router.push({path:'/login'})
    }
  
  }
});
</script>
